@INIT 10
@IDLE 50
@SLAVE 0
@MASTER 0
@PIN_CODE 200
@PIO_IRQ 300
@INQUIRY 0
@MESSAGE 0
@CONTROL 0
@SENSOR 0
@ALARM 100
@UART 0
@FTP 0
1 RESERVED
2 1234
3 RESERVED
8 54850
10 Z=1
11 A=uart1152
12 A=pioout5
13 A=pioclr5
14 A=uarton
15 A=auxdac200;
16 A=lcd"AIRcable  
17 A=pioout9
18 A=pioset9
19 A=pioclr20
20 A=pioclr12
21 A=pioin12
22 A=getuniq$8
23 $0="AIRcable Demo 
24 PRINTV$8
25 A=name$0
26 W=0
27 S=0
28 A=pioirq"P0000000000010
29 RETURN
50 GOTO
100 IFW#0THEN320;
101 IFS=0THEN120;
102 IFS=1THEN125;
103 IFS=2THEN130;
104 IFS=3THEN135;
106 S=0
110 A=slave200;
111 A=pioset20;
112 A=pioclr20
113 ALARM5
114 S=S+1
115 RETURN
120 A=lcd"DATE      
121 GOTO110;
125 A=date$1;
126 $1[8]=0;
127 A=lcd$1;
128 GOTO110
130 A=lcd"TIME       
131 GOTO110;
135 A=date$1;
136 $1=$1[8];
137 $1[8]=32
138 A=lcd$1;
139 S=-1
140 GOTO110;
200 $0=$2;
201 RETURN
300 IF$0[12]=49THEN310;
301 IFW=3THEN304;
302 IFW=0THEN304;
303 W=0
304 RETURN
310 $3=$0;
311 W=1;
312 ALARM3
313 RETURN
320 IF$3[12]=49THEN330;
321 W=0;
322 GOTO101
330 ALARM0
331 A=pioirq"P000000000000000
332 A=lcd"GOOD BYE
335 A=pioset20;
336 A=pioclr20
337 A=pioget12;
338 IFA=1THEN335;
339 ALARM0;
340 W=3
341 A=reboot
342 FORE=0TO10
343 WAIT1
344 NEXTE
345 RETURN
